<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Chỉnh sửa menu
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i>Admins</a></li>
        <li><a href="#">Sản phẩm</a></li>
      </ol>
    </section>
    <?php if($temp['mess']!='')
    {
    ?>
    <div class="pad margin no-print">
          <div style="margin-bottom: 0!important;" class="callout callout-info">												
                <?php echo $temp['mess']; ?>
          </div>
    </div>    
    <?php
    }
    ?>
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <!-- form start -->
            <form role="form" action="<?php echo DOMAIN.'/'; ?>application.php?mod=mod_admin&control=Menus&task=edit" method="POST">
                <input type="hidden" name="id" value="<?php echo  $firstArray['ID_MENU']; ?>" /> 
                <!-- left column -->
                <div class="col-lg-12">
                  <!-- general form elements -->
                  <div class="box box-primary">
                    <div class="box-header">
                      <h3 class="box-title">Chỉnh sửa menu</h3>
                    </div><!-- /.box-header -->
                      <div class="box-body">
                        <!-- Name cat -->
                        <div class="form-group">
                          <label>Tên menu <i class="fa fa-asterisk"></i></label>
                          <input type="text" class="form-control" value="<?php echo  $firstArray['NAME_MENU']; ?>" placeholder="Tên menu không được bỏ trống" name="NAME_MENU" />
                        </div>                
                        <div class="form-group">
                          <label>Tên menu title <i class="fa fa-asterisk"></i></label>
                          <input type="text" class="form-control" value="<?php echo  $firstArray['SEO_MENU']; ?>" placeholder="Tên menu title không được bỏ trống" name="SEO_MENU" />
                        </div>
                        <div class="form-group">
                          <label>Url menu <i class="fa fa-asterisk"></i></label>
                          <input type="text" class="form-control" value="<?php echo  $firstArray['URL_MENU']; ?>" placeholder="Url menu không được bỏ trống" name="URL_MENU" />
                        </div>                                                                                               
                      </div><!-- /.box-body -->    
                      <div class="box-footer">
                        <button type="submit" class="btn btn-primary">Submit</button>
                      </div>
                  </div><!-- /.box -->               
                </div>             
            </form>
        </div>
    </section><!-- /.content -->    
</div><!-- /.content-wrapper -->
<script>
    $('form').validate({
        rules: {
            NAME_MENU: {
                required: true
            },
            SEO_MENU: {
                required: true
            },
            URL_MENU: {
                required: true
            }                        
        },
        highlight: function(element) {
            $(element).closest('.form-group').addClass('has-error');
        },
        unhighlight: function(element) {
            $(element).closest('.form-group').removeClass('has-error');
        },
        errorElement: 'span',
        errorClass: 'help-block',
        errorPlacement: function(error, element) {
            if(element.parent('.input-group').length) {
                error.insertAfter(element.parent());
            } else {
                error.insertAfter(element);
            }
        }
    });
</script>